/* 'use strict';
const Controller = require('egg').Controller;
class HomeController extends Controller {
  async index() {
    const { ctx } = this;
    var data1 = await ctx.model.User.find({})
    console.log(data1)
    // await ctx.render("index.html",{res:"msg"});
  }
  async start() {
    const { ctx } = this;
    var data2 = await ctx.model.User2.find({})
    console.log(data2)
  }
}
module.exports = HomeController; */

'use strict';
const Controller = require('egg').Controller;
class HomeController extends Controller {
  async index() {
    const { ctx } = this;
    var data = await ctx.service.user.find({})
    console.log(data)
    ctx.body = {data}
  }
  async render() {
    const { ctx } = this;
    ctx.body = 'render'
  }
}
module.exports = HomeController;
